/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * IFrameTest.java
 *
 * Created on 18 ม.ค. 2553, 11:29:25
 */

package testpackage;

import javax.swing.JPanel;

/**
 *
 * @author werapan
 */
public class IFrameTest extends javax.swing.JInternalFrame {

    /** Creates new form IFrameTest */
    public IFrameTest() {
        super("Hello",true,true,true,true);
        pnlList=null;
        pnlEdit=null;

        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabMain = new javax.swing.JTabbedPane();
        tabList = new javax.swing.JScrollPane();
        tabEdit = new javax.swing.JScrollPane();

        setMaximizable(true);
        setResizable(true);
        setTitle("ตัวอย่าง internal frame");

        tabMain.addTab("จัดการ", tabList);
        tabMain.addTab("แก้ไข", tabEdit);

        getContentPane().add(tabMain, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane tabEdit;
    private javax.swing.JScrollPane tabList;
    private javax.swing.JTabbedPane tabMain;
    // End of variables declaration//GEN-END:variables
    private JPanel pnlList;
    private JPanel pnlEdit;
    /**
     * @return the tabEdit
     */
    public javax.swing.JScrollPane getTabEdit() {
        return tabEdit;
    }

    /**
     * @param tabEdit the tabEdit to set
     */
    public void setTabEdit(javax.swing.JScrollPane tabEdit) {
        this.tabEdit = tabEdit;
    }

    /**
     * @return the tabList
     */
    public javax.swing.JScrollPane getTabList() {
        return tabList;
    }

    /**
     * @param tabList the tabList to set
     */
    public void setTabList(javax.swing.JScrollPane tabList) {
        this.tabList = tabList;
    }

    /**
     * @return the pnlList
     */
    public JPanel getPnlList() {
        return pnlList;
    }

    /**
     * @param pnlList the pnlList to set
     */
    public void setPnlList(JPanel pnlList) {
        this.pnlList = pnlList;
        tabList.setViewportView(pnlList);

    }

    /**
     * @return the pnlEdit
     */
    public JPanel getPnlEdit() {
        return pnlEdit;
    }

    /**
     * @param pnlEdit the pnlEdit to set
     */
    public void setPnlEdit(JPanel pnlEdit) {
        this.pnlEdit = pnlEdit;
        tabEdit.setViewportView(pnlEdit);
    }

}
